-- WeiboAgent
-- Created by chengb Dec/8/2015
-- 负责微博相关逻辑

module("WeiboAgent", package.seeall);

-- 内部函数声明
local onWeiboShareSucc;

-- 初始化
function init()
    -- 注册微博分享成功回调
    SdkMgr.registerOCCallback("onWeiboShareSucc", onWeiboShareSucc);
end

-- 微博分享成功的回调
function onWeiboShareSucc(shareType)
    shareType = tonumber(shareType);

    trace("WeiboAgent", "微博分享成功，类型：%d", shareType);

    -- 抛出分享成功的事件
    EventMgr.fire(event.WEIBO_SHARE_SUCC, { ["shareType"] = shareType, });
end


